package com.bgs.utils;

import java.time.LocalDateTime;

/**
 * @Auther: 梁玉杰
 * @Date: 2022/5/9 15:57
 * @Description: TODO
 */
public class LocaldatetimeUtils {
    public static String  times(LocalDateTime localDateTime){
        int year = localDateTime.getYear();
        int monthValue = localDateTime.getMonthValue();
        int dayOfMonth = localDateTime.getDayOfMonth();
        String time = year+"年"+monthValue+"月"+dayOfMonth+"日";
        return time;
    }

    public static String timess(LocalDateTime localDateTime){
        int year = localDateTime.getYear();
        int monthValue = localDateTime.getMonthValue();
        String time = year+"年"+monthValue+"月";
        return time;
    }

    public static String  timesss(LocalDateTime localDateTime){
        int year = localDateTime.getYear();
        int monthValue = localDateTime.getMonthValue();
        int dayOfMonth = localDateTime.getDayOfMonth();
        int hour = localDateTime.getHour();
        int minute = localDateTime.getMinute();
        int second = localDateTime.getSecond();
        String time = year+"年"+monthValue+"月"+dayOfMonth+"日"+hour+"时"+minute+"分"+second+"秒";
        return time;
    }

}
